<template>
	<div class='recomm-detail'>
	  <detail-item :items="items" :nr="nr"/>
	</div>
</template>

<script>
	const api = require("../../../wxapi/config.js")
	import DetailItem from '../../../component/show-detail/ShowDetail'
	export default {
		name: 'RecommendDetail',
		components: {
			DetailItem
		},
		data() {
			return {
				items: {},
				nr: '',
				id: ''
			}
		},
		onLoad(options) {
			console.log(options)
			this.getData(options.id)
		},
		methods: {
			getData (val) {
				api.getRecommendDetail({
				  id: val
				}).then((res) => {
					this.items = res.data[0],
					this.nr = res.data[0].nr
				
				})
			}
				
		}
	}
</script>

<style scoped>
</style>
